//  fork 译为分叉
const fs = require('fs');
const childProcess = require('child_process');
 
for(var i=0; i<3; i++) {
   var workerprocess = childProcess.fork("common.js", [i]);    
 
   workerprocess.on('close', function (code) {
      console.log('子进程已退出，退出码 ' + code);
   });
}
